package game.element.block;

import game.utility.ResourceUtility;

import java.awt.Image;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ExitDoor extends AbstractBlockElement {
	public static final String TYPE = "EXIT";

	private static final String EXITDOOR_IMAGE_SOURCE = ResourceUtility.getLevelElementImagePath("door.png");

	private static Image EXITDOOR_IMAGE;

	static {
		try {
			EXITDOOR_IMAGE = ImageIO.read(new File(EXITDOOR_IMAGE_SOURCE));
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
	}

	public ExitDoor(int x, int y) {
		super(x, y);
		setImage(EXITDOOR_IMAGE);
		setCollosionEnabled(false);
	}

	@Override
	public String getType() {
		return TYPE;
	}
}